<!--
 * @Author: your name
 * @Date: 2020-10-30 16:16:04
 * @LastEditTime: 2020-11-02 16:19:17
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \HelloWorld\templates\runoob.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{title}}</title>
    {% load my_tags %}
</head>
<body> # 取出整个列表
    <p>{{ views_list | length }}</p>  # 取出列表的第一个元素
    <p>{{ views_list.0 |truncatechars:2}}</p>

    <p>{{views_dic}}</p>
    <p>{{views_dic.name}}</p>

    {{ views_str|safe }}
    <p>{{num}}</p>
    {%if views_num > 90 and views_num <= 100 %}
    优秀
    {% elif views_num > 60 and views_num <= 90 %}
    合格
    {% else %}
    一边玩去～
    {% endif %}

    {% for i in views_list %}
    <p>{{ i }}</P>
    {% endfor %}

    {% for i,j in views_dic.items %}
    {{ i }}---{{ j }}
    {% endfor %}


    {% for i in views_list2 %}
    {{ forloop.counter0 }}
{% empty %}
    空空如也～
{% endfor %}


    {% for i in views_list2 %}
    {{ forloop.counter0 }}
    {% empty %}
        空空如也～
    {% endfor %}

    <br>
    {{ 11|my_filter:22 }}


    {% my_html "zzz" "xxx" %}
</body>
</html>